!(function (lib,config) {
    if (!lib) return;
    var loadFunc = function () {
        var wordAry = config.words.split('|');

        document.writeln("<style>");
        document.writeln(".clear {clear: both;}");
        document.writeln(".left {float: left;}");
        document.writeln(".right {float: right;}");
        document.writeln(".swt_foot .f_text{border-top: none;border-left: none;border-right: none;}");
        document.writeln(".zjzjxx .zjzjxx_lip,.zjzjxx_p3 li,.zjzjxx_p3 li p{margin:0 !important;}");
        document.writeln("#qpswt_center img{display: inline-block !important; }");
        document.writeln(".qpcenter_header{padding: 0.8em 1em;display:-webkit-box;-webkit-box-pack: justify;-webkit-box-align:center;background: #13a4db;position: absolute !important; max-width: 640px;left: 0;right: 0;margin: 0 auto;box-sizing: border-box;z-index:999999;}");
        document.writeln(".qpcenter_header .headera1{font-size: 1em; color: #ffffff;}");
        document.writeln(".qpcenter_header .headerdivc h1{color: #fff000;font-size: 1.33em;text-align: center;margin-bottom: 0.3em;}");
        document.writeln(".qpcenter_header .headerdivc p{color: #ffffff; font-size: 0.8em;text-align: center;}");
        document.writeln(".qpcenter_header .headera2{width: 8.4%;display: block;}");
        document.writeln(".qpcenter_header .headera2 img{width: 100%;}");
        document.writeln(".conten{width: 93.75%;margin: 1em auto;}");
        document.writeln(".yytit{padding: 0.8em 0;background: #f2f2f2;}");
        document.writeln(".yytit h1{text-align: center;font-size: 1.8em;color: #13a4db;margin-bottom: 0.3em;}");
        document.writeln(".yytit p{width: 95%;background: #ffffff;text-align: center;font-size: 1em;color: #666666;text-align: center;margin:  0 auto;padding: 0.6em 0;overflow: hidden;white-space:nowrap;}");
        document.writeln(".yytit p img{margin-left: 0.3em;margin-right: 0.2em;}");
        document.writeln(".benner_foot{ background:#f5f5f5; margin-bottom:1px; text-align:center;font-size: 0.92em; padding:0.8em 0;}");
        document.writeln(".benner_foot span{ background:#f4a101; color:#FFF; margin:0 5px; padding:2px 6px;}");
        document.writeln(".content {width: 100%;height: auto;overflow: hidden;margin: 0 auto;background:#ebebeb;}");
        document.writeln(".zjzl {width: 90%;padding: 0.8em 0;margin: 0 auto;border-bottom: 1px dashed #e4e4e4;}");
        document.writeln(".zjzl-l {width: 23.75%;float: left; border-radius:10px; overflow: hidden;}");
        document.writeln(".zjzl-r {width: 70%;float: right;line-height: 180%;color: #333;font-size: 1em;}");
        document.writeln(".zjzl-r_img{padding-top: 0.1em;padding-bottom: 0.1em; font-weight: bold;font-size: 1.5em;color: #2196F3;}");
        document.writeln(".zjzl-r_img img{ width:65.5%;}");
        document.writeln(".zjzl-r p span{ color:#ec4402;}");
        document.writeln(".zjzjxx{margin: 1em auto;width: 90%;}");
        document.writeln(".zjzjxx .zjzjxx_p1{font-size: 1.25em;color: #666666;text-align: center;}");
        document.writeln(".zjzjxx .zjzjxx_p1 font{color: #ee7800;}");
        document.writeln(".zjzjxx .zjzjxx_p2{display:-webkit-box;-webkit-box-pack: justify;-webkit-box-align:center;font-size: 1em;color: #666666;}");
        document.writeln(".zjzjxx .zjzjxx_p2 li{margin: 0.5em 0;}");
        document.writeln(".zjzjxx_p2l{display:-webkit-box;-webkit-box-pack: justify;-webkit-box-align:center;}");
        document.writeln(".zjzjxx .zjzjxx_lip{font-size: 29%;background: #13a4db;color: #ffffff;border-radius: 0.3em;font-size: 1em;margin-right: 0.4em;text-align: center;padding: 0.2em 0 0.2em 0.2em;}");
        document.writeln(".zjzjxx_p3{display:-webkit-box;-webkit-box-pack: justify;-webkit-box-align:center;color: #666666;font-size: 1em;}");
        document.writeln(".zjzjxx_p3 li{display:-webkit-box;-webkit-box-pack: justify;-webkit-box-align:center;width: 45%;height: 1.4em;line-height: 1.4em;}");
        document.writeln(".zjzjxx_p3 li p{width: 30%;background: #ee7800;height: 0.8em;line-height: 0.8em;}");
        document.writeln(".zxjm{display: block; width: 75%;overflow: hidden; border: 1px solid #d7eef7;background: #f5fcff;color: #ee7800;text-align: center;height: 2em;line-height: 2em;border-radius: 0.3em;margin: 1em auto;font-size: 1.17em; text-decoration:none; }");
        document.writeln(".xiangxijs{    border: 1px solid #f2f2f2;width: 90%;margin: 1em auto;}");
        document.writeln(".zxzx {width: 90%;height: 7em;margin: 1em auto;}");
        document.writeln(".swt_box {width: 100%;height: auto;padding-bottom: 1.25em;}");
        document.writeln(".swt_box-t {font-size: 0.92em;line-height: 150%;color: #333;text-align: center;width: 100%;margin: 0;height: 1.41em;}");
        document.writeln(".swt_box-b {width: 100%;height: auto;padding-bottom: 1.25em;}");
        document.writeln(".swt_box-l {width: 11.3%;float: left;border-radius:10px; overflow: hidden;}");
        document.writeln(".swt_box-r {  position:relative; width: 77%;height: auto;display: block;color: #333;border: 1px solid #6fb44d;padding:0.92em 2% 0.92em 3%;float: right;line-height: 180%;font-size: 1em;background: none repeat scroll 0% 0% #a0e75a;border-radius: 0.3em; text-decoration:none; }");
        document.writeln(".swt_box-r span{display:block;width:0;height:0;border-width:10px 10px 10px 0;border-style:solid;border-color:transparent #a0e75a transparent transparent;position:absolute;top:20%;left:-8px;}");
        document.writeln("#dh1, #dh2, #dh3 {display: none;margin-top:10px;}");
        document.writeln(".divxian{ background:#d7d7d9; height:1px;}");
        document.writeln(".footwb{position: fixed;z-index: 9999;bottom: 0; border-top:1px solid #dedee0; width:100%;max-width: 640px;}");
        document.writeln(".swt_foot{width:100%;background: #fff; padding: 0.5em 0% 0.5em;}");
        document.writeln(".swt_foot_img{ float:left; width:7.8%;height: 2.3em;line-height: 2.3em; margin-left:3%;margin-right:3%;}");
        document.writeln(".swt_foot .f_text {width: 62.5%; height: 2.3em;line-height: 2.3em; float: left;border-bottom: 1px solid #cfcece;display: block;font-size: 1.08em;color: #b9b7b7;text-indent: 0.45em;}");
        document.writeln(".swt_foot a{  display:block; width:16.7%; float:right;margin-right:3%; }");
        document.writeln(".f_btn{display: block;background: #13a4db;color: #ffffff;font-size: 1.08em;height: 2em;line-height: 2em;text-align: center;border-radius: 0.3em;}");
        document.writeln("#qpswt_center{display:none;background: #ffffff; position: absolute !important; max-width: 640px; height: 100%; left: 0; bottom: 0;right:0; z-index: 9999999999999;overflow: auto;margin: 0 auto;} #LR-BUBBLE-MSG{ height:auto !important;}");
        document.writeln(" @media only screen and (min-width: 320px) and (max-width: 359px) {");
        document.writeln(" 	#qpswt_center{font-size: 12px !important;}}");
        document.writeln(" @media only screen and (min-width: 360px) and (max-width: 361px) {");
        document.writeln(" 	#qpswt_center{font-size: 13px !important;}}");
        document.writeln(" @media only screen and (min-width: 362px) and (max-width: 384px) {");
        document.writeln(" 	#qpswt_center{font-size: 14px !important;}}");
        document.writeln(" @media only screen and (min-width: 385px) and (max-width: 480px) {");
        document.writeln(" 	#qpswt_center{font-size: 15px !important;}}");
        document.writeln(" @media only screen and (min-width: 481px) and (max-width: 599px) {");
        document.writeln(" 	#qpswt_center{font-size: 16px !important;}}");
        document.writeln(" @media only screen and (min-width: 600px) and (max-width: 639px) {");
        document.writeln(" 	#qpswt_center{font-size: 22px !important;}}");
        document.writeln(" @media only screen and (min-width: 640px) {");
        document.writeln(" 	#qpswt_center{font-size: 24px !important;}}");
        document.writeln("</style>");

        document.writeln("<div id=\'qpswt_center\'><div class=\'qpcenter_header\' id=\'qpcenter_header\'><a class=\'headera1\'onclick=\'qpswt_center_n()\'><font style=\'font-family: \'宋体\';margin-right: 0.3em;\'id=\'returnback\'>&lt;</font>返回</a><div class=\'headerdivc\' onclick=\'openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");\'><h1>在线咨询平台</h1><p>专家在线解答<font style=\'color:#fff000;\'id=\'headerf\'></font>问题，26人正在提问</p></div><a class=\'headera2\'href=\'#\'><img src=\' http://data.minijs.cn/public/tel.png\'/></a></div><div class=\'clearb\'></div><div class=\'conten\' style=\"width:100%;\"><div class=\'yytit\'><h1>健康咨询中心</h1><p class=\'\'>医保定点医院</p></div><div class=\'xiangxijs\'><div class=\'zjzl\'onclick=\'LR_HideInvite();openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");return false;\'><div class=\'zjzl-l\'><img src=\' " +config.imglink + "\'width=\'100%\'/></div><div class=\'zjzl-r\'><div class=\'zjzl-r_img\'>" +config.dotname +"</div><p>患者推荐热度（综合）：<span>9.0<span></p><p>患者关怀热度：<a href=\'#\'target=\'_blank\'style=\'color:red;\'>&hearts;&hearts;&hearts;&hearts;&hearts;</a></p></div><div class=\'clear\'></div></div><div class=\'zjzjxx\'><p class=\'zjzjxx_p1\'>医院学科带头人</p><ul class=\'zjzjxx_p2\'><li>临床经验：<font color=\'#ee7800\'>30余年</font></li><li class=\'zjzjxx_p2l\'><p class=\'zjzjxx_lip\'><img src=\' http://data.minijs.cn/public/ljzx.png\'align=\'absmiddle\'style=\'width: 17.19%;\'/>累计咨询：</p><font color=\'#ee7800\'>130185次</font></li></ul><ul class=\'zjzjxx_p3\'><li>咨询率：<p></p>99%</li><li>回复率：<p></p>100%</li></ul><a class=\'zxjm\'href=\'javascript:void(0);\'onclick=\'openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");\'>对话已加密，请放心咨询</a></div></div><div class=\'zxzx\'style=\'height:auto;\'><div class=\'box\'id=\'dh1\'><div class=\'swt_box-t\'id=\'now1\'></div><div class=\'swt_box-b\'><div class=\'swt_box-l\'><img src=\'" +config.imglink + "\'width=\'100%\'/></div><a id=\"\" href=\'javascript:void(0);\'onclick=\'openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");\'target=\'_blank\'class=\'swt_box-r\'><span></span>" + wordAry[0] + "</a></div><div class=\'clear\'></div></div><div class=\'box\'id=\'dh2\'><div class=\'swt_box-b\'><div class=\'swt_box-l\'><img src=\'" +config.imglink + "\'width=\'100%\'/></div><a href=\'javascript:void(0);\'onclick=\'openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");\'target=\'_blank\'class=\'swt_box-r\'><span></span>" + wordAry[1] + "</a></div><div class=\'clear\'></div></div><div class=\'box\'id=\'dh3\'><div class=\'swt_box-b\'><div class=\'swt_box-l\'><img src=\'" +config.imglink + "\'width=\'100%\'/></div><a id=\"\" href=\'javascript:void(0);\'onclick=\'openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");\'target=\'_blank\'class=\'swt_box-r\'><span></span><div id=\'LR-BUBBLE-MSG\'>" + wordAry[2] + "</div></a></div><div class=\'clear\'></div></div></div><div style=\'height:55px;\'class=\'bottomdiv\'></div></div><div class=\'footwb\'><div class=\'swt_foot\'><div class=\'swt_foot_img\'onclick=\'LR_HideInvite();openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");return false;\'><img src=\' http://data.minijs.cn/public/foot.gif\'width=\'100%\'/></div><input type=\'text\'id=\'gmsg\'value=\'\'onfocus=\'this.value=\'\'\'onblur=\'this.value=keys\'onclick=\'LR_HideInvite();openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");return false;\'autocomplete=\'off\'target=\'_blank\'class=\'f_text\'><a target=\'_blank\'class=\'f_btn\'href=\'javascript:void(0);\'onclick=\'openZoosUrl(\"chatwin\",\"&e=tan-qpfkyy\");return false;\'>发送</a><div class=\'clear\'></div></div></div></div>");

        var strqpzx = '请输入您要咨询的内容';
        var i = 0;
        function typings() {
            var divTyping = document.getElementById('gmsg');
            if (i <= strqpzx.length) {
                divTyping.value = strqpzx.slice(0, i++) + '_';
                setTimeout(arguments.callee, 200);//递归调用
            }
            else {
                //divTyping.innerHTML = str;//结束打字,移除 _ 光标
                i = 0;
                setTimeout(arguments.callee, 1000);
            }
        }
        setTimeout(typings, 9000);



        function qpswt_center_b() {
            document.getElementById('qpswt_center').style.display = "block";
            var clearb = document.querySelector(".clearb");
            //clearb.style.height=document.querySelector("#qpcenter_header").clientHeight+"px";
            setTimeout(dh1, 1000);
        }
        setTimeout(qpswt_center_b, config.firsttime*1000)

        function qpswt_center_n() {
            document.getElementById('qpswt_center').style.display = "none";
            $("#dh1").fadeOut(0);
            $("#dh2").fadeOut(0);
            $("#dh3").fadeOut(0);
            $('#qpswt_center').animate({ scrollTop: 0 }, 100);
            setTimeout(qpswt_center_b, 15000)
        }
        function dh1() {
            $("#dh1").fadeIn(0);
            setTimeout(dh2, 3000);
            $('#qpswt_center').animate({ scrollTop: $('.bottomdiv').offset().top }, 500);
        }
        function dh2() {
            $("#dh2").fadeIn(0);
            setTimeout(dh3, 3000);
            $('#qpswt_center').animate({ scrollTop: $('.bottomdiv').offset().top }, 500);
        }
        function dh3() {
            $("#dh3").fadeIn(0);
            $('#qpswt_center').animate({ scrollTop: $('.bottomdiv').offset().top }, 500);
        }

        var now = new Date();
        var hh = now.getHours();
        var mm = now.getMinutes();
        var ss = now.getSeconds();
        var date1 = document.getElementById("now1");
        function getDateWeek(obj) { if (obj < 10) return "0" + obj; else return obj; }
        //date1.innerHTML = getDateWeek(hh) + ":" + getDateWeek(mm) + ":" + getDateWeek(ss);

        if (config.iscomapp !== '1') {
            document.writeln("<style>");
            document.writeln(".qpcenter_header{position:fixed !important;}");
            document.writeln("#qpswt_center{position:fixed !important;}");
            document.writeln("</style>");
        } else {
            window.setInterval(qpBeat, 1);
        }
        function qpBeat() {
            var e = e || window.event;
            var scrolltop = document.documentElement.scrollTop || document.body.scrollTop;
            var box = document.getElementById('qpswt_center');
            var topbox = document.getElementById('qpcenter_header');
            box.style.top = scrolltop + 'px';
            //topbox.style.top = scrolltop+'px';
            //console.log(scrolltop); 
        }
    }
    lib.load(loadFunc);
})('{{lib}}','{{config}}');

